<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
    <TITLE></TITLE>
    <META content="text/html; charset=utf-8" http-equiv="Content-Type" />
    <LINK rel=stylesheet type=text/css href="http://www.ucmaim.com/Public/Ucmaim/Admin/css/login.css" />
    <style>
        label.outer-label{position:relative;margin-top: 12px;}
        input.error{border: 1px solid red !important; outline: none;}
        label.error{color:red; position:absolute; display: block; left:70px;}
    </style>
    <script type="text/javascript" src="http://www.ucmaim.com/Public/Ucmaim/Admin/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="http://www.ucmaim.com/Public/Ucmaim/Admin/js/jquery.form.min.js"></script>
    <SCRIPT type=text/javascript>
        $(document).ready(function(){
            $('#loginForm').validate({
                rules: {
                    admin_name: {
                        required: true
                    },
                    admin_pass: {
                        required: true
                    },
                    verify: {
                        required: true,
                        remote:{
                            type: 'POST',
                            url: "<?php echo U('Admin/Auth/ajax_verifycode');?>",
                            data: {
                                verify: function() {
                                    return $("#verify").val();
                                }
                            }
                        }
                    }
                },
                messages: {
                    admin_name: {
                        required: '请输入管理员账号'
                    },
                    admin_pass: {
                        required: '请输入管理员密码'
                    },
                    verify: {
                        required: '请输入验证码',
                        remote: '验证码不正确'
                    }
                }
            });
        });
    </SCRIPT>
<BODY id="login">
<div style="background:#CCCCCC">
    <FORM id=loginForm onSubmit="" method="post" action="/admin/auth/Login/">

        <H3>网站后台登录</H3>

        <LABEL class="outer-label"><SPAN>管理帐号：</SPAN><INPUT id="user"  class="input" maxlength="20" type="text" name="admin_name"> </LABEL>

        <LABEL class="outer-label"><SPAN>登录密码：</SPAN><INPUT id="pass" class="input" maxlength="20" type="password"  name="admin_pass"> </LABEL>

        <LABEL class="outer-label"><SPAN>验 证 码：</SPAN><INPUT id="verify" class="input" maxlength="4" type="text"  name="verify"> </LABEL>

        <LABEL class="outer-label"><SPAN></SPAN><span style="margin-left:70px; margin-top:-10px;"><img src="<?php echo U('Home/Api/VerifyCode');?>" onclick="this.src=this.src+'?'+Math.random()" width="200" height="50" /></span></LABEL>


        <br><br>
        <DIV id="submit"><button class="submit" type="submit">立即登录</button></DIV>

    </FORM>
</div>
</BODY></HTML>